import { createRouter, createWebHashHistory } from 'vue-router'

import Detail from "../views/Detail";
import List from "../views/List";
import Login from "../views/Login";
import Register from "../views/Register";
import Activate from "../views/Activate";

const routes = [
    {
        path: '/',
        name: 'Index',
        component: List
    },
    {
        path: '/list/:type',
        name: 'List',
        component: List
    },
    {
        path: '/detail/:id',
        name: 'Detail',
        component: Detail
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/register',
        name: 'Register',
        component: Register
    },
    {
        path: '/activate/:cipher/:email',
        name: 'Activate',
        component: Activate
    },
];

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});


export default router
